package com.lhy.mymall.request;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author: 卢辉宇
 * @date: 2022/12/14 12:37
 * @description: 添加目录的请求类，封装需要添加的目录字段（有点类似pojo的实体类）
 */
@Data
public class AddCategoryReq {
    @NotNull(message = "name不能为空")
    @Size(min = 2,max = 5,message = "name要在2和5个字符之间")
    private String name;

    @NotNull(message = "type不能为空")
    @Max(3)
    private Integer type;

    @NotNull(message = "parentId不能为空")
    private Integer parentId;

    @NotNull(message = "orderNum不能为空")
    private Integer orderNum;
}
